<?php 
file_put_contents($path."/".$name, base64_decode($image));

echo $row['imagen'];

?> 